-- GENERATED SPELL FOR [Skeletal Usher] --


function spell0_16471(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(29666,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16471', 8271, 1)
end

function spell1_16471(pUnit, Event) --@Ice Tomb,n/a--
pUnit:FullCastSpellOnTarget(29670,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16471', 5250, 1)
end

function spell2_16471(pUnit, Event) --@Magnetic Pull,n/a--
pUnit:FullCastSpellOnTarget(29661,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16471', 0, 1)
end

function Sorts_16471(pUnit, Event)
local choix_sorts_16471 = math.random(0, 2)
if choix_sorts_16471 == 0 then
pUnit:RegisterEvent('spell0_16471', 1, 1)
end
if choix_sorts_16471 == 1 then
pUnit:RegisterEvent('spell1_16471', 1, 1)
end
if choix_sorts_16471 == 2 then
pUnit:RegisterEvent('spell2_16471', 1, 1)
end
end

function mob16471_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16471', math.random(1500, 3000), 1)
end

function mob16471_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16471_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16471_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16471, 1, 'mob16471_Action')
RegisterUnitEvent(16471, 2, 'mob16471_Leave')
RegisterUnitEvent(16471, 3, 'mob16471_Kill')
RegisterUnitEvent(16471, 4, 'mob16471_Die')
